package com.ultimatech.wxservice.web.controller.business;

import com.ultimatech.webappdemo.authmgr.service.IAuthService;
import com.ultimatech.webappdemo.authmgr.service.impl.AuthServiceImpl;
import com.ultimatech.wxservice.combusiness.service.IComBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zhangleping on 2017/5/11.
 */
@Controller
@RequestMapping(AuthServiceImpl.BUSINESS_ROOT_PATH)
public class PageController extends BaseBusinessController {
    @Autowired
    @Override
    public void setAuthService(IAuthService authService) {
        super.setAuthService(authService);
    }

    @RequestMapping(value = "/{name}/manager/test")
    public String test(@PathVariable String name, Model model) throws Throwable {
        model.addAttribute("goupName",name);
        IComBusinessService businessSvr=this.getBusinessSvr(name);
        businessSvr.test();
        return name+"/test";
    }
}
